<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html>
<html lang="en">

	<head>
		<meta charset="UTF-8">
		<title>添加场地</title>
		<link rel="stylesheet" type="text/css" href="../css/global.css">
		<link rel="stylesheet" type="text/css" href="../css/form.css" />
		<link rel="stylesheet" type="text/css" href="../css/add.css" />
		<link rel="stylesheet" type="text/css" href="../css/popup.css" />
		<link rel="stylesheet" type="text/css" href="../css/upload.css" />
		<link rel="stylesheet" href="../../css/layui.css">
	</head>

	<body>
		<div class="container">
			<h1 class="tabTitle"><span onclick="NewPage('../../html/index.html')"><img src="../../images/xjt.png"/></span>添加场馆</h1>
			<div class="info">
			   	<form action="#" method="post" enctype="multipart/form-data" onsubmit="return checkForm()" class="formSheet">
					
					<dl>
						<dt><span>请填写账号</span></dt>
						<dd>
							<div class="fbox">
								<input type="text" class="textStyle" id="userName" name="userName" style="width:360px;" placeholder="手机号/邮箱" />
							</div>
						</dd>
					</dl>
					<dl>
						<dt><span>请填写密码</span></dt>
						<dd>
							<div class="fbox">
								<input type="password" class="textStyle" id="userName" name="userName" style="width:360px;" placeholder="请输入密码" />
							</div>
						</dd>
					</dl>
				
					<dl>
						<dt><span>场馆信息</span></dt>
						<dd>
							<div class="fbox">
								<input type="text" list="url_list2" class="textStyle" style="width:200px;" />
								<datalist id="url_list2">
						              <option  value="鸟巢" />
						        </datalist>
							</div>
						</dd>
					</dl>
					<dl>
						<dt>&nbsp;</dt>
						<dd>
							<input type="submit" value="保存" class="button save" />
						</dd>
					</dl>

				</form>
			</div>
		</div>

		<!--上传弹出框开始    "mb_"后面的值与里面的div名称必须保持一致-->
		<div id="mb_upfile">&nbsp;</div>
		<div class="popup" id="upfile">
			<h1>上传文件<span class="closeX" onclick="closeMask('upfile')">X</span></h1>
			<div class="pInfo">
				<form action="#">
					<div class='uploadfile' id="uploadfile"></div>
				</form>
			</div>
			<div class="pfooter">
				<input type="button" class="button" value="上传" id="upload" onclick="uploadFile()" />

			</div>
		</div>
		<!--蒙板结束-->

		<script type="text/javascript" src='../../js/jquery-3.3.1.min.js'></script>
		<script type="text/javascript" src="../../js/global.js"></script>
		<script type="text/javascript" src="../../js/popup.js"></script>
		<script type="text/javascript" src="../../js/upload.js"></script>
		<script type="text/javascript">
			//上传弹窗
			$(function() {
				$("#upload").click(function() {
					//参数false代表文件不是图片
					up_load(true);
					//弹框
					mask(420, 270, true, "upfile");
				});

			});
			//表单验证   注意：文本提示的信息应在开始的时候全部写在placeholder中
			function checkForm() {
				var name = checkUserName();
				return name;
			}
			//验证姓名   
			function checkUserName() {
				var username = $("#userName");
				var usernameText=$("#userNameText");
				if(username.val() == "") {
					username.addClass("err");
					usernameText.text("姓名输入不能超过四个字符")
					usernameText.addClass("red");
					return false;
				} else {
					username.removeClass("err");
					return true;
				}
			}
		</script>

	</body>

</html>